package cm.server.controller;

import cm.server.dao.VenueRepository;
import cm.server.entity.Venue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author zy
 * @description
 * @date 2021/4/10 11:06
 */
@RestController
@RequestMapping("venues")
@CrossOrigin
public class VenueController {
    @Autowired
    private VenueRepository venueRepository;

    @RequestMapping(value = "/getVenue", method = RequestMethod.GET)
    @ResponseBody
    public Venue getVenue(String userName, String venueName) {
        return venueRepository.findVenue(userName, venueName);
    }
}
